import { Get, Post } from "@/library/utils/request";

/**
 * 权限管理 - 系统菜单树 API请求路径
 */
export const MenuApiUrl = {
  SelectMenus: "Rbac/SelectMenuTree",
  InsertMenu: "Rbac/InsertMenu",
  UpdateMenu: "Rbac/UpdateMenu",
  DeleteMenu: "Rbac/DeleteMenu"
}

export const MenuApi = {
  /** 获取菜单 */
  SelectMenus: (param: any) => {
    return Get(MenuApiUrl.SelectMenus, param);
  },
  /** 新增菜单 */
  InsertMenu: (param: object) => {
    return Post(MenuApiUrl.InsertMenu, param);
  },
  /** 编辑菜单 */
  UpdateMenu: (param: object) => {
    return Post(MenuApiUrl.UpdateMenu, param);
  },
  /** 删除菜单 */
  DeleteMenu: (param: object) => {
    return Post(MenuApiUrl.DeleteMenu, param);
  }
}
